<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC Generator (erpcgen): SearchPath.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC Generator (erpcgen)
   &#160;<span id="projectnumber">Rev. 1.7.4</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_search_path_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">SearchPath.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014-2016, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright 2016 NXP</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#if !defined(_searchpath_h_)</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define _searchpath_h_</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;list&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">// Classes</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_path_searcher.html">   22</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_path_searcher.html">PathSearcher</a></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;{</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="keyword">enum</span> _target_type</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    {</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        kFindFile,</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        kFindDirectory</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    }; </div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">enum</span> _target_type <a class="code" href="class_path_searcher.html#ab2a0b67049e737e4558ad5d62147b0d9">target_type_t</a>; </div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_path_searcher.html#a8bf0b820c7cccbdda02214ca626e9ac5">   37</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="class_path_searcher.html">PathSearcher</a> *<a class="code" href="class_path_searcher.html#a8bf0b820c7cccbdda02214ca626e9ac5">s_searcher</a>;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">static</span> <a class="code" href="class_path_searcher.html">PathSearcher</a> &amp;<a class="code" href="class_path_searcher.html#a2d808911bacf77ecb43afd7f3de08a8e">getGlobalSearcher</a>();</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="class_path_searcher.html#a0a2b1157faa1145b87258e65b7c2d8df">   45</a></span>&#160;    <a class="code" href="class_path_searcher.html#a0a2b1157faa1145b87258e65b7c2d8df">PathSearcher</a>() {}</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_path_searcher.html#af9554bf75313b8d268db3b642e0c4008">addSearchPath</a>(<span class="keyword">const</span> std::string &amp;path);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_path_searcher.html#adae60e58362ae0098ffdc8fbf1b9e007">setTempPath</a>(<span class="keyword">const</span> std::string &amp;path);</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_path_searcher.html#a32c8f23e9994995e464722ea07bd0529">search</a>(<span class="keyword">const</span> std::string &amp;base, target_type_t targetType, <span class="keywordtype">bool</span> searchCwd, std::string &amp;result);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_path_searcher.html#a63744c70ba23ec6b7ba57e8cc6ea2fea">   57</a></span>&#160;    <span class="keyword">typedef</span> std::list&lt;std::string&gt; <a class="code" href="class_path_searcher.html#a63744c70ba23ec6b7ba57e8cc6ea2fea">string_list_t</a>; </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_path_searcher.html#a7a90afcb04c4b53f299123b969afea4f">   58</a></span>&#160;    string_list_t <a class="code" href="class_path_searcher.html#a7a90afcb04c4b53f299123b969afea4f">m_paths</a>;                        </div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_path_searcher.html#af0457aa7e4e966a830a60bda2c106139">   59</a></span>&#160;    std::string <a class="code" href="class_path_searcher.html#af0457aa7e4e966a830a60bda2c106139">m_tempPath</a>;                       </div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_path_searcher.html#a5d9ed7d522f86c5c9f28ee392859215d">isAbsolute</a>(<span class="keyword">const</span> std::string &amp;path);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    std::string <a class="code" href="class_path_searcher.html#ae28b10bb9bf2c700244a9e1b17f7d1e3">joinPaths</a>(<span class="keyword">const</span> std::string &amp;first, <span class="keyword">const</span> std::string &amp;second);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;};</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">#endif // _searchpath_h_</span></div><div class="ttc" id="class_path_searcher_html_af0457aa7e4e966a830a60bda2c106139"><div class="ttname"><a href="class_path_searcher.html#af0457aa7e4e966a830a60bda2c106139">PathSearcher::m_tempPath</a></div><div class="ttdeci">std::string m_tempPath</div><div class="ttdoc">Possibility to add temporary path. </div><div class="ttdef"><b>Definition:</b> SearchPath.h:59</div></div>
<div class="ttc" id="class_path_searcher_html_a2d808911bacf77ecb43afd7f3de08a8e"><div class="ttname"><a href="class_path_searcher.html#a2d808911bacf77ecb43afd7f3de08a8e">PathSearcher::getGlobalSearcher</a></div><div class="ttdeci">static PathSearcher &amp; getGlobalSearcher()</div><div class="ttdoc">Access global path searching object. </div><div class="ttdef"><b>Definition:</b> SearchPath.cpp:29</div></div>
<div class="ttc" id="class_path_searcher_html_af9554bf75313b8d268db3b642e0c4008"><div class="ttname"><a href="class_path_searcher.html#af9554bf75313b8d268db3b642e0c4008">PathSearcher::addSearchPath</a></div><div class="ttdeci">void addSearchPath(const std::string &amp;path)</div><div class="ttdoc">Add a new search path to the end of the list. </div><div class="ttdef"><b>Definition:</b> SearchPath.cpp:39</div></div>
<div class="ttc" id="class_path_searcher_html_a32c8f23e9994995e464722ea07bd0529"><div class="ttname"><a href="class_path_searcher.html#a32c8f23e9994995e464722ea07bd0529">PathSearcher::search</a></div><div class="ttdeci">bool search(const std::string &amp;base, target_type_t targetType, bool searchCwd, std::string &amp;result)</div><div class="ttdoc">Attempts to locate a file by using the search paths. </div><div class="ttdef"><b>Definition:</b> SearchPath.cpp:65</div></div>
<div class="ttc" id="class_path_searcher_html_adae60e58362ae0098ffdc8fbf1b9e007"><div class="ttname"><a href="class_path_searcher.html#adae60e58362ae0098ffdc8fbf1b9e007">PathSearcher::setTempPath</a></div><div class="ttdeci">void setTempPath(const std::string &amp;path)</div><div class="ttdoc">Set temporary path. </div><div class="ttdef"><b>Definition:</b> SearchPath.cpp:44</div></div>
<div class="ttc" id="class_path_searcher_html_a5d9ed7d522f86c5c9f28ee392859215d"><div class="ttname"><a href="class_path_searcher.html#a5d9ed7d522f86c5c9f28ee392859215d">PathSearcher::isAbsolute</a></div><div class="ttdeci">bool isAbsolute(const std::string &amp;path)</div><div class="ttdoc">Returns whether path is absolute. </div><div class="ttdef"><b>Definition:</b> SearchPath.cpp:120</div></div>
<div class="ttc" id="class_path_searcher_html_a63744c70ba23ec6b7ba57e8cc6ea2fea"><div class="ttname"><a href="class_path_searcher.html#a63744c70ba23ec6b7ba57e8cc6ea2fea">PathSearcher::string_list_t</a></div><div class="ttdeci">std::list&lt; std::string &gt; string_list_t</div><div class="ttdoc">Linked list of strings. </div><div class="ttdef"><b>Definition:</b> SearchPath.h:57</div></div>
<div class="ttc" id="class_path_searcher_html_ae28b10bb9bf2c700244a9e1b17f7d1e3"><div class="ttname"><a href="class_path_searcher.html#ae28b10bb9bf2c700244a9e1b17f7d1e3">PathSearcher::joinPaths</a></div><div class="ttdeci">std::string joinPaths(const std::string &amp;first, const std::string &amp;second)</div><div class="ttdoc">Combines two paths into a single one. </div><div class="ttdef"><b>Definition:</b> SearchPath.cpp:129</div></div>
<div class="ttc" id="class_path_searcher_html_ab2a0b67049e737e4558ad5d62147b0d9"><div class="ttname"><a href="class_path_searcher.html#ab2a0b67049e737e4558ad5d62147b0d9">PathSearcher::target_type_t</a></div><div class="ttdeci">enum _target_type target_type_t</div><div class="ttdef"><b>Definition:</b> SearchPath.h:33</div></div>
<div class="ttc" id="class_path_searcher_html_a7a90afcb04c4b53f299123b969afea4f"><div class="ttname"><a href="class_path_searcher.html#a7a90afcb04c4b53f299123b969afea4f">PathSearcher::m_paths</a></div><div class="ttdeci">string_list_t m_paths</div><div class="ttdoc">Ordered list of paths to search. </div><div class="ttdef"><b>Definition:</b> SearchPath.h:58</div></div>
<div class="ttc" id="class_path_searcher_html"><div class="ttname"><a href="class_path_searcher.html">PathSearcher</a></div><div class="ttdoc">Handles searching a list of paths for a file. </div><div class="ttdef"><b>Definition:</b> SearchPath.h:22</div></div>
<div class="ttc" id="class_path_searcher_html_a0a2b1157faa1145b87258e65b7c2d8df"><div class="ttname"><a href="class_path_searcher.html#a0a2b1157faa1145b87258e65b7c2d8df">PathSearcher::PathSearcher</a></div><div class="ttdeci">PathSearcher()</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> SearchPath.h:45</div></div>
<div class="ttc" id="class_path_searcher_html_a8bf0b820c7cccbdda02214ca626e9ac5"><div class="ttname"><a href="class_path_searcher.html#a8bf0b820c7cccbdda02214ca626e9ac5">PathSearcher::s_searcher</a></div><div class="ttdeci">static PathSearcher * s_searcher</div><div class="ttdoc">Global search object singleton. </div><div class="ttdef"><b>Definition:</b> SearchPath.h:37</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">Copyright 2016-2020 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
